package org.jeecg.modules.purchase.entity;

import java.io.Serializable;
import java.io.UnsupportedEncodingException;
import java.util.Date;
import java.math.BigDecimal;

import com.baomidou.mybatisplus.annotation.*;
import lombok.Data;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.jeecg.common.aspect.annotation.Dict;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * @Description: 采购合同
 * @Author: jeecg-boot
 * @Date:   2022-11-15
 * @Version: V1.0
 */
@Data
@TableName("purchase_contract")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="purchase_contract对象", description="采购合同")
public class PurchaseContract implements Serializable {
    private static final long serialVersionUID = 1L;

	/**ID*/
	@TableId(type = IdType.ASSIGN_ID)
    @ApiModelProperty(value = "ID")
    private String id;
	/**合同编码*/
	@Excel(name = "合同编码", width = 15)
    @ApiModelProperty(value = "合同编码")
    private String code;
	/**发起事由*/
	@Excel(name = "发起事由", width = 15)
    @ApiModelProperty(value = "发起事由")
    private String reason;
	/**合同类型  */
	@Excel(name = "合同类型", width = 15, dicCode = "purchase_contract_type")
	@Dict(dicCode = "purchase_contract_type")
    @ApiModelProperty(value = "合同类型  ")
    private String type;
	/**供应商编码*/
	@Excel(name = "供应商编码", width = 15)
    @ApiModelProperty(value = "供应商编码")
    private String providerCode;
	/**供应商名称*/
	@Excel(name = "供应商名称", width = 15)
    @ApiModelProperty(value = "供应商名称")
    private String providerName;
	/**供应商联系电话*/
	@Excel(name = "供应商联系电话", width = 15)
    @ApiModelProperty(value = "供应商联系电话")
    private String providerPhone;
	/**我方单位名称*/
	@Excel(name = "我方单位名称", width = 15)
    @ApiModelProperty(value = "我方单位名称")
    private String ourName;
	/**金额类型*/
	@Excel(name = "金额类型", width = 15, dicCode = "purchase_money_type")
	@Dict(dicCode = "purchase_money_type")
    @ApiModelProperty(value = "金额类型")
    private String moneyType;
	/**金额*/
	@Excel(name = "金额", width = 15)
    @ApiModelProperty(value = "金额")
    private Double money;
	/**发票类型*/
	@Excel(name = "发票类型", width = 15, dicCode = "purchase_invoice_type")
	@Dict(dicCode = "purchase_invoice_type")
    @ApiModelProperty(value = "发票类型")
    private String invoiceType;
	/**税率*/
	@Excel(name = "税率", width = 15, dicCode = "purchase_tax_rate")
	@Dict(dicCode = "purchase_tax_rate")
    @ApiModelProperty(value = "税率")
    private String taxRate;
	/**合同签订日期*/
	@Excel(name = "合同签订日期", width = 15, format = "yyyy-MM-dd")
	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern="yyyy-MM-dd")
    @ApiModelProperty(value = "合同签订日期")
    private Date signTime;
	/**合同开始时间*/
	@Excel(name = "合同开始时间", width = 15, format = "yyyy-MM-dd")
	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern="yyyy-MM-dd")
    @ApiModelProperty(value = "合同开始时间")
    private Date startTime;
	/**合同结束时间*/
	@Excel(name = "合同结束时间", width = 15, format = "yyyy-MM-dd")
	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern="yyyy-MM-dd")
    @ApiModelProperty(value = "合同结束时间")
    private Date endTime;
	/**签订人*/
	@Excel(name = "签订人", width = 15, dictTable = "sys_user", dicText = "realname", dicCode = "username")
	@Dict(dictTable = "sys_user", dicText = "realname", dicCode = "username")
    @ApiModelProperty(value = "签订人")
    private String signBy;
	/**备注*/
	@Excel(name = "备注", width = 15)
    @ApiModelProperty(value = "备注")
    private String remark;
	/**附件*/
//	@Excel(name = "附件", width = 15)
    @ApiModelProperty(value = "附件")
    private String attachment;
	/**创建人*/
    @ApiModelProperty(value = "创建人")
    @TableField(fill=FieldFill.INSERT)
    private String createBy;
	/**创建时间*/
	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "创建时间")
    @TableField(fill=FieldFill.INSERT)
    private Date createTime;
	/**最后修改人*/
    @ApiModelProperty(value = "最后修改人")
    @TableField(fill=FieldFill.UPDATE)
    private String updateBy;
	/**最后修改时间*/
	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "最后修改时间")
    @TableField(fill=FieldFill.UPDATE)
    private Date updateTime;
    /**逻辑删除 */
    @TableLogic
//    @Excel(name = "逻辑删除 ", width = 15)
    @ApiModelProperty(value = "逻辑删除 0:未删除  1:删除")
    private Integer delFlag;
	/**当前登录用户部门编号*/
    @ApiModelProperty(value = "当前登录用户部门编号")
    private String sysOrgCode;
	/**租户id*/
//	@Excel(name = "租户id", width = 15)
    @ApiModelProperty(value = "租户id")
    private String tenantId;
}
